- if current_site
  title== escape_once("#{current_site.name} &mdash; #{Locomotive.config.name}")
- else
  title= escape_once(Locomotive.config.name)

= csrf_meta_tag

- key = Rails.application.config.session_options[:key]

meta name='key-param' content=Rails.application.config.session_options[:key]
meta name='key-token' content=cookies[key]
meta name='unsaved-content-warning' content=t('locomotive.messages.unsaved_content_warning')
meta name="viewport" content="width=device-width, initial-scale=1"

link rel="icon" type="image/png" href="#{asset_url('locomotive/favicon.png')}" sizes="32x32"

javascript:
  window.Locomotive = { mounted_on: '#{Locomotive.mounted_on}' }

link href="https://fonts.googleapis.com/css?family=Muli:400,300|Noto+Sans:400,700" rel="stylesheet" type="text/css"

= stylesheet_link_tag     'locomotive/application', media: 'screen'
= javascript_include_tag  'locomotive'

= render 'locomotive/shared/main_app_head_before_backbone'

javascript:
  window.locale                     = '#{locale}';
  window.content_locale             = '#{current_content_locale}';

  $(document).ready(function() {

    window.application_view = new Locomotive.Views.ApplicationView({
      flash:      #{{flash_messages_to_json}},
      view:       #{backbone_view_class_name}
    });
    window.application_view.render();

  });

= yield :head

= render 'locomotive/shared/main_app_head'
